/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tv.global.util;



import javax.ejb.Stateless;

/**
 *
 * @author ctrosch
 */
@Stateless
//@Singleton
public class DemoTimerBean {
    /**
    public class DemoTimerBean implements TimedObject {
     private SessionContext context;

    @Override
    public void ejbTimeout(Timer timer) {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
     //métodos comunes del EJB

    @Override
     public void ejbTimeout(Timer arg0) {
         System.err.println("---------------- Timer--------------------------------------------");
         System.err.println("---------------- Timer--------------------------------------------");
         System.err.println("---------------- Timer--------------------------------------------");
     }

     public TimerHandle crearTimer(long intervalo) {
         System.err.print("Timer crado");
         TimerService timerService = context.getTimerService();
    	 Timer timer = timerService.createTimer(500 ,"created timer");
    	 return timer.getHandle();
     }
     * */

 }
